package com.CST.mapper.cst.cb;

import com.CST.dto.cb.SysRoleDTO;
import com.CST.entity.cb.BdSysRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
/**
 * <p>
 * 角色管理 Mapper接口
 * </p>
 * @author y
 * @since 2021-09-27
 */
@Mapper
@Repository
public interface BdSysRoleMapper extends BaseMapper<BdSysRole> {

    /**
     * <p>更新角色表</p >
     * @author y
     * @since 2021/09/27 09:11
     * @return boolean
     */
    boolean updateSysRole(BdSysRole bdSysRole);

    /**
     * <p>查询角色表</p >
     * @author y
     * @since 2021/09/27 09:13
     * @return com.CST.entity.cb.BdSysRole
     */
    @Select("select * from BD_SysRole where id=#{id}")
    BdSysRole getSysRoleById(@Param("id") String id);


    /**
     * <p>id和名称查询</p >
     * @param id, roleName
     * @author y
     * @since 2021/09/27 09:51
     * @return java.util.List<com.CST.entity.cb.BdSysRole>
     */
    List<BdSysRole> getSysRole(@Param("id") String id, @Param("roleName") String roleName);

    /**
     * <p>列表查询</p >
     * @author y
     * @since 2021/09/27 09:16
     * @return java.util.List<com.CST.entity.cb.BdSysRole>
     */
    List<BdSysRole> getSysRolesList(SysRoleDTO sysRoleDto);
}
